@use "../variables" as *;

.toasts-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: $z-toast;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-container {
  padding: 12px 24px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 14px;
  animation: toastIn 0.3s ease;
  pointer-events: auto;

  &.info {
    background: rgba(0, 0, 0, 0.8);
  }

  &.success {
    background: rgba(40, 167, 69, 0.9);
  }

  &.warning {
    background: rgba(255, 193, 7, 0.9);
  }

  &.error {
    background: rgba(220, 53, 69, 0.9);
  }

  .toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .toast-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: white;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;

    &:hover {
      opacity: 1;
    }

    svg {
      fill: currentColor;
    }
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}